import Vue from 'vue'
import VueRouter from 'vue-router'
import Login from '../views/Login'

Vue.use(VueRouter)

const routes = [
  {
    /*路由路径为/则重定向到/login路由*/
    path: "/",
    redirect: "/login"
  },
  {
    path: "/login",
    name: "Login",
    component: Login
  },
  {
    path: "/home",
    name: "Home",
    component: ()=>import("../views/Home.vue"),
    //home路由下得子路由有哪些
    children:[
      {
        name: "List",
        path:"/acl/type/list",
        component: ()=>import("../views/acl/type/List.vue")
      },
      {
        name: "User",
        path:"/acl/user/lists",
        component: ()=>import("../views/acl/user/lists.vue")


      },
      {
        path: '/acl/branch/list',
        name: 'Branch',
        component: () => import('../views/Branch')
      },
      {
        path: '/acl/ordermanage/list',
        name: 'OrderManage',
        component: () => import('../views/OrderManage')
      },
      {
        path: '/acl/branchallauditing/list',
        name: 'BranchAllAuditing',
        component: () => import('../views/BranchAllAuditing')
      },
      {
        path: '/acl/auditformation/list',
        name: "AuditInformation",
        component: () => import('../views/AuditInformation')
      },
      {
        path: '/acl/goods/list',
        name: 'Goods',
        component: () => import('../views/Goods')
      },
      {
        path: '/acl/permission/list',
        name: 'Permissions',
        component: () => import('../views/acl/permission/Permission')
      },
      {
        path: '/statistics/list',
        name: 'Statistics',
        component: () => import('../views/Statistics')
      },
      {
        path: '/foodsales/list',
        name: 'Foodsales',
        component: () => import('../views/Foodsales')
      },
    ],

  },
  {
    path: '/qr',
    name: "QualificationReview",
    component: () => import('../views/QualificationReview')
  }


]

const router = new VueRouter({
  //mode: 'history',
  routes
})

export default router
